package com.xja.git.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

public class BlogUser {
    private Integer id;

    private String username;

    private String nickname;

    private String password;

    private Integer gender;

    private String headpic;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH-mm-ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH-mm-ss")
    private Date birthday;

    private String mail;

    private String status;

    private String site;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username == null ? null : username.trim();
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname == null ? null : nickname.trim();
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password == null ? null : password.trim();
    }

    public Integer getGender() {
        return gender;
    }

    public void setGender(Integer gender) {
        this.gender = gender;
    }

    public String getHeadpic() {
        return headpic;
    }

    public void setHeadpic(String headpic) {
        this.headpic = headpic == null ? null : headpic.trim();
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public String getMail() {
        return mail;
    }

    public void setMail(String mail) {
        this.mail = mail == null ? null : mail.trim();
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status == null ? null : status.trim();
    }

    public String getSite() {
        return site;
    }

    public void setSite(String site) {
        this.site = site == null ? null : site.trim();
    }

    public BlogUser() {
    }

    public BlogUser(Integer id, String username, String nickname, String password, Integer gender, String headpic, Date birthday, String mail, String status, String site) {
        this.id = id;
        this.username = username;
        this.nickname = nickname;
        this.password = password;
        this.gender = gender;
        this.headpic = headpic;
        this.birthday = birthday;
        this.mail = mail;
        this.status = status;
        this.site = site;
    }

    public BlogUser(String username, String nickname, String password, Integer gender, String headpic, Date birthday, String mail, String status, String site) {
        this.username = username;
        this.nickname = nickname;
        this.password = password;
        this.gender = gender;
        this.headpic = headpic;
        this.birthday = birthday;
        this.mail = mail;
        this.status = status;
        this.site = site;
    }

    @Override
    public String toString() {
        return "BlogUser{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", nickname='" + nickname + '\'' +
                ", password='" + password + '\'' +
                ", gender=" + gender +
                ", headpic='" + headpic + '\'' +
                ", birthday=" + birthday +
                ", mail='" + mail + '\'' +
                ", status='" + status + '\'' +
                ", site='" + site + '\'' +
                '}';
    }
}